package com.gobang.gobang;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.File;
import java.io.IOException;
import java.util.logging.*;

public class ClientApplication extends Application {


    @Override
    public void start(Stage stage) {
        try {

            // 加载房间列表界面
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("room-list-view.fxml"));
            Scene scene = new Scene(fxmlLoader.load(), 800, 600);
            stage.setTitle("五子棋 - 房间列表");
            stage.setScene(scene);
            stage.show();
            // 获取控制器并触发连接按钮点击
            RoomListController controller = fxmlLoader.getController();
            controller.handleConnect();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }
} 